﻿using DataLibrary.Utility;
using KOLTV.MVCUtility;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Web;
using System.Web.Mvc;

namespace KOLTV.Controllers
{
    public class BaseController : Controller
    {
        public BaseController()
        {

        }
        /// <summary>
        /// 重写JsonResult 使用Newtonsoft.Json代替框架自带的Json编码器
        /// </summary>
        /// <param name="data"></param>
        /// <param name="contentType"></param>
        /// <param name="contentEncoding"></param>
        /// <param name="behavior"></param>
        /// <returns></returns>
        protected override JsonResult Json(object data, string contentType, Encoding contentEncoding, JsonRequestBehavior behavior)
        {
            return new CustomesJsonResult { Data = data, ContentType = contentType, ContentEncoding = contentEncoding, JsonRequestBehavior = behavior };
        }

    }
}